// 现代化登录页面样式
.modern-login {
  min-height: 100vh;
  background: linear-gradient(135deg, #f0f9ff 0%, #bae6fd 100%);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;

  // 暗黑模式
  &.dark {
    background: linear-gradient(135deg, #0f172a 0%, #0c4a6e 100%);
  }

  // 背景装饰元素
  &::before {
    content: '';
    position: absolute;
    width: 2000px;
    height: 2000px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
    top: -10%;
    right: 48%;
    transform: translateY(-50%);
    z-index: 0;
    transition: 1.8s ease-in-out;
  }

  // 波浪背景
  .wave {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
  }

  // 顶部工具栏
  .top-toolbar {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;

    .dark & {
      background-color: rgba(30, 30, 46, 0.4);
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
  }

  // 登录容器
  .login-container {
    width: 100%;
    max-width: 1200px;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 auto;
    padding: 0;
    position: relative;
    z-index: 1;
  }

  // 左侧图片区域
  .img {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    padding: 3rem;

    svg {
      max-width: 500px;
      height: auto;
      filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.2));
      animation: float 6s ease-in-out infinite;
    }
  }

  // 右侧登录框
  .login-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 1;
  }

    .login-form {
    width: 450px;
    max-width: 90%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;

    // 英文版本时增加宽度
    &.login-form-en {
      width: 500px;
    }

    // 暗黑模式下的登录表单
    .dark & {
      background-color: rgba(30, 30, 46, 0.8);
      box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    }

    &:hover {
      transform: translateY(-5px);
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);

      .dark & {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
      }
    }

    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 5px;
      background: linear-gradient(90deg, #2563eb, #0ea5e9, #2563eb);
      background-size: 200% 100%;
      animation: gradientMove 3s ease infinite;
    }
  }

  @keyframes gradientMove {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }

  // 头像
  .avatar {
    width: 100%;
    max-height: 80px;
    margin-bottom: 1rem;
  }

    // 标题
  h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    .dark & {
      background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
  }

      // 表单项样式
  :deep(.el-form-item) {
    margin-bottom: 1.5rem;
  }

  :deep(.el-form-item__label) {
    .dark & {
      color: #e2e8f0;
    }
  }

  :deep(.el-input__wrapper) {
    border-radius: 50px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    padding: 0 15px;
    transition: all 0.3s ease;

    &:hover, &:focus-within {
      box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    }

    .dark & {
      background-color: rgba(30, 30, 46, 0.6);
      box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);

      &:hover, &:focus-within {
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
      }
    }
  }

  :deep(.el-input__inner) {
    height: 45px;

    .dark & {
      color: #e2e8f0;

      &::placeholder {
        color: #94a3b8;
      }
    }
  }

    // 验证码输入框
  :deep(.el-input-group__append) {
    padding: 0;
    border-top-right-radius: 50px;
    border-bottom-right-radius: 50px;
    overflow: hidden;

    .dark & {
      background-color: rgba(30, 30, 46, 0.6);
      border-color: rgba(82, 82, 128, 0.4);
    }

    .re-image-verify {
      height: 45px;
      display: flex;
      align-items: center;

      canvas {
        height: 100%;

        .dark & {
          filter: brightness(0.9) contrast(1.1);
        }
      }
    }
  }

  :deep(.el-checkbox) {
    .el-checkbox__inner {
      border-radius: 4px;
    }

    // 英文版本记住登录样式
    .remember-login-en {
      .remember-text {
        font-size: 0.75rem;
      }
    }
  }

  // 英文版本适配
  .remember-select {
    min-width: 4rem;
  }

    // 操作按钮
  .operation-btn {
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;

    &.text-xs {
      font-size: 0.75rem;
    }
  }

  // 忘记密码按钮
  .forget-btn {
    &.text-xs {
      font-size: 0.75rem;
    }
  }

    // 按钮样式
  :deep(.el-button) {
    border-radius: 50px;
    padding: 12px 24px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    &:not(.el-button--link) {
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);

      &:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
      }

      .dark & {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);

        &:hover {
          box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
        }
      }
    }

        // 暗黑模式下的文本按钮
    &.el-button--text {
      .dark & {
        color: #60a5fa;

        &:hover {
          color: #38bdf8;
        }
      }
    }
  }

    // 主按钮样式
  :deep(.el-button--primary) {
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    border: none;

    &:hover {
      background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    }

    .dark & {
      background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);

      &:hover {
        background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
      }
    }
  }

    // 第三方登录图标
  .third-party-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;

    .icon-wrapper {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: #f5f5f5;
      transition: all 0.3s ease;
      cursor: pointer;

      .dark & {
        background-color: rgba(51, 65, 85, 0.6);
      }

      &:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);

        .dark & {
          box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
        }
      }
    }
  }

  // 响应式设计
  @media screen and (max-width: 1024px) {
    &::before {
      right: 30%;
    }

    .login-container {
      grid-template-columns: 1fr 1.2fr;
    }
  }

  @media screen and (max-width: 768px) {
    &::before {
      bottom: 50%;
      right: 50%;
      transform: translate(50%, 50%);
      width: 1500px;
      height: 1500px;
    }

    .wave {
      display: none;
    }

    .login-container {
      grid-template-columns: 1fr;
      padding: 1.5rem;
    }

    .img {
      display: none;
    }

    .login-box {
      padding: 1rem;
    }

    .login-form {
      padding: 2rem;
    }
  }
}

// 漂浮动画
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}
